This invention relates to an angle calculation circuit for calculating the phase of two-dimensional vector.
Conventionally, an angle calculation circuit using a ROM (read-only memory) is known. Referring to FIG. 1, the conventional angle calculation circuit is explained below. A ROM 401 is input with in-phase component I of M bits and orthogonal component Q of M bits, and then outputs an arctan (Q/I) (arctangent) value of L bits that is written in an address corresponding to these I and Q as angle information signal.
Thus, the conventional angle calculation circuit conducts the angle calculation using the ROM. However, such an angle calculation circuit must incur an increase in circuit size.
Accordingly, it is an object of the invention to provide an angle calculation circuit that realizes the angle calculation by a simple composition without ROM.
According to the invention, an angle calculation circuit, comprises:
a sign determination circuit to which two-dimensional vector composed of in-phase signal and orthogonal signal is input and which determines the sign of the in-phase signal and the orthogonal signal and outputs a group of in-phase sign determination signals and a group of orthogonal sign determination signals;
a first decoder to which the group of in-phase sign determination signals and the group of orthogonal sign determination signals are input and which outputs calculating angle information by unit of more than 90xc2x0 as first angle information signal;
an angle-narrowing condition generating circuit to which the in-phase signal and the orthogonal signal are input and which outputs a group of angle-narrowing condition signals to indicate the conditions for calculating angle information by unit of less than 90xc2x0; and
a second decoder to which the group of angle-narrowing condition signals, the group of in-phase sign determination signals and the group of orthogonal sign determination signals are input and which outputs calculating angle information by unit of less than 90xc2x0 as second angle information signal;
wherein the angle-narrowing condition generating circuit comprises a tangent calculation circuit to which the in-phase signal is input and which outputs a group of tangent signals given by multiplying the in-phase signal by tan xcfx86 (xcfx86 is a predetermined constant to satisfy 0xc2x0 less than xcfx86 less than 90xc2x0), and a comparator to which the group of tangent signals and the orthogonal signal are input and which compares the group of tangent signals and the orthogonal signal and outputs the angle-narrowing condition signal.
According to another aspect of the invention, an angle calculation circuit, comprises:
a sign determination circuit to which two-dimensional vector composed of in-phase signal and orthogonal signal is input and which determines the sign of the in-phase signal and the orthogonal signal and outputs a group of in-phase sign determination signals and a group of orthogonal sign determination signals;
a first decoder to which the group of in-phase sign determination signals and the group of orthogonal sign determination signals are input and which outputs calculating angle information by unit of more than 90xc2x0 as first angle information signal;
an absolute-value calculation circuit to which the in-phase signal and the orthogonal signal are input and which calculates the absolute values of the in-phase signal and the orthogonal signal and outputs the absolute values the in-phase signal and the orthogonal signal as in-phase absolute-value signal and orthogonal absolute-value signal, respectively;
an angle-narrowing condition generating circuit to which the in-phase absolute-value signal and the orthogonal absolute-value signal are input and which outputs a group of angle-narrowing condition signals to indicate the conditions for calculating angle information by unit of less than 90xc2x0; and
a second decoder to which the group of angle-narrowing condition signals, the group of in-phase sign determination signals and the group of orthogonal sign determination signals are input and which outputs calculating angle information by unit of less than 90xc2x0 as second angle information signal;
wherein the angle-narrowing condition generating circuit comprises a tangent calculation circuit to which the in-phase absolute-value signal is input and which outputs a group of tangent signals given by multiplying the in-phase absolute-value signal by either tans or tan xcfx86 or tan (90xc2x0xe2x88x92xcfx86)(xcfx86 is a predetermined constant to satisfy 0xc2x0 less than xcfx86 less than 90xc2x0), and a comparator to which the group of tangent signals and the orthogonal absolute-value signal are input and which compares the group of tangent signals and the orthogonal absolute-value signal and outputs the angle-narrowing condition signal.
According to another aspect of the invention, an angle calculation circuit, comprises:
a sign determination circuit to which two-dimensional vector composed of in-phase signal and orthogonal signal is input and which determines the sign of the in-phase signal and the orthogonal signal and outputs a group of in-phase sign determination signals and a group of orthogonal sign determination signals;
a first decoder to which the group of in-phase sign determination signals and the group of orthogonal sign determination signals are input and which outputs calculating angle information by unit of more than 90xc2x0 as first angle information signal;
an absolute-value calculation circuit to which the in-phase signal and the orthogonal signal are input and which calculates the absolute values of the in-phase signal and the orthogonal signal and outputs the absolute values the in-phase signal and the orthogonal signal as in-phase absolute-value signal and orthogonal absolute-value signal, respectively;
an angle-narrowing condition generating circuit to which the in-phase absolute-value signal and the orthogonal absolute-value signal are input and which outputs absolute-value comparison signal to indicate the comparison result of the in-phase absolute-value signal and the orthogonal absolute-value signal, and outputs a group of angle-narrowing condition signals to indicate the conditions for calculating angle information by unit of less than 90xc2x0; and
a second decoder to which the absolute-value comparison signal, the group of angle-narrowing condition signals, the group of in-phase sign determination signals and the group of orthogonal sign determination signals are input and which outputs calculating angle information by unit of less than 90xc2x0 as second angle information signal;
wherein the angle-narrowing condition generating circuit comprises a first comparator to which the in-phase absolute-value signal and the orthogonal absolute-value signal are input and which compares the in-phase absolute-value signal and the orthogonal absolute-value signal and outputs the absolute-value comparison signal, a selector to which the in-phase absolute-value signal, the orthogonal absolute-value signal and the absolute-value comparison signal are input and which outputs larger one of the in-phase absolute-value signal and the orthogonal absolute-value signal as first selection absolute-value signal and smaller one of the in-phase absolute-value signal and the orthogonal absolute-value signal as second selection absolute-value signal, a tangent calculation circuit to which the first selection absolute-value signal is input and which outputs a group of tangent signals given by multiplying the first selection absolute-value signal by either tan xcfx86 or tan (90xc2x0xe2x88x92xcfx86) (xcfx86 is a predetermined constant to satisfy 0xc2x0 less than xcfx86 less than 90xc2x0), and a second comparator to which the group of tangent signals and the second selection absolute-value signal are input and which compares the group of tangent signals and the second selection absolute-value signal and outputs the angle-narrowing condition signal.